from django.db import models
from django.contrib.auth.models import User

# Create your models here.
class Talking(models.Model):
    title = models.CharField(max_length = 100)
    content = models.TextField()
    time = models.DateTimeField(auto_now = True, auto_now_add = False)
    user = models.ForeignKey(User)
    comments_num = models.IntegerField()

class TalkingComments(models.Model):
    talking = models.ForeignKey(Talking)
    content = models.TextField()
    user = models.ForeignKey(User)
    time = models.DateTimeField(auto_now = True, auto_now_add = True)
